package com.owc.domain.vo.admin;

import com.owc.common.converter.InputConverter;
import com.owc.domain.entity.Notice;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author xiaom
 * @Date 2020/3/3 10:33
 * @Version 1.0.0
 * @Description <>
 **/
@Data
@ApiModel("公告入参")
public class NoticeVo implements Serializable, InputConverter<Notice> {

    @ApiModelProperty("公告名称")
    @NotNull(message = "请输入公告名称")
    private String title;

    @ApiModelProperty("公告内容")
    @NotNull(message = "请输入公告内容")
    private String content;

    @ApiModelProperty("状态 -1(下架) 5(上架)")
    @NotNull(message = "请选择状态")
    private Integer status;

    @ApiModelProperty("排序值")
    @NotNull(message = "请输入排序值")
    private Integer sort;

    @Override
    public void customConverter(Notice notice) throws Exception {
        initBasisData(notice);
    }
}
